<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS-数据类型</title>
</head>
<body>
    
</body>
<script>
    //原始数据类型
    alert(typeof 2.1); //number

    alert(typeof "A"); //string
    alert(typeof 'Hello'); //string

    alert(typeof true); //boolean

    alert(typeof null); //object 最初错误，延用至今

    var a;
    alert(typeof a); //undefined 未初始化，默认值
</script>
</html>